package interfacedemo;

/**
 * @author Brace
 * @Title:
 * @Description:智能家居冰箱，接入智能家居接口
 *              1；内部类，一个定义到另一个类的内部，从而成为外部类的一个成员
 *                  内部类里面可以有成员变量，、方法
 * @date 2020/5/815:50
 */
public class Fridge implements SmartHome{
    private int temperature;
    private  int height;
    private  int width;
    //定义一个内部类，冰箱的冷冻层
    private class Cold{
        private int coldTemperature;
        private int coldHeight;
        private  int coldWidth;
        private void makeIceCream(){
            System.out.println("五羊的雪糕好吃");
        }
    }
    @Override
    public void showYourFunction() {
        System.out.println("我是冰箱");
    }

    @Override
    public boolean connection() {
        System.out.println("冰箱已连接");
        return false;
    }

    public int getTemperature() {
        return temperature;
    }

    public void setTemperature(int temperature) {
        this.temperature = temperature;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }
}
